package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/9/21.
 */

public class MasterInfo {


    /**
     * id : 1
     * name : xiejiashuo
     * intro : qwert
     * type : shejiandashi
     * num : 12314
     * club_id : 1
     * photo : qq
     * gender : 1
     */

    private int id;
    private String name;
    private String intro;
    private String type;
    private int num;
    private int club_id;
    private String photo;
    private int gender;

    public static MasterInfo objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), MasterInfo.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public void setClub_id(int club_id) {
        this.club_id = club_id;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public void setGender(int gender) {
        this.gender = gender;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getIntro() {
        return intro;
    }

    public String getType() {
        return type;
    }

    public int getNum() {
        return num;
    }

    public int getClub_id() {
        return club_id;
    }

    public String getPhoto() {
        return photo;
    }

    public int getGender() {
        return gender;
    }
}
